package marble.model {

	import flash.filters.GlowFilter;
	
	import mx.core.UIComponent;

	public class PlanProxy extends UIComponent {

		private var plan:Plan;

		public function PlanProxy(elements:Array,
								  monday:Date,
								  min:int, max:int,
								  addRem:Boolean,
								  reg:Boolean,
								  userElements:Array) {
			super();
			plan = new Plan(elements, monday, min, max, addRem, reg, userElements);
			explicitWidth = plan.width;
			explicitHeight = plan.height;
			filters = [new GlowFilter(0xcccccc, 0.75, 10, 10, 2, 1)];
			addChild(plan);
		}
		
		public function get userElements():Array {
			return plan.userElements;
		}
		
		public function set userElements(value:Array):void {
			plan.userElements = value;
		}

		public function set showAll(value:Boolean):void {
			plan.showAll = value;
		}
		
		public function get showAll():Boolean {
			return plan.showAll;
		}
		
		public function redraw():void {
			plan.redraw();
		}
	}
}